home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 November / EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso / earcd / util / misc / lcontrol.lha / LControl153 / Install < prev    next >
Text File  |  1995-08-17  |  11KB  |  448 lines

  1. ; Installationsskript für LControl 1.53
  2. ; $VER: LControl Install 1.53 (09.06.95)
  3. ; (c) 1995 Michael Watzl
  4.  
  5. (set version 1)
  6. (set revision 53)
  7.  
  8. ; *********** Zuerst Strings sprachenabhängig initialisieren **
  9. (if (= @language "deutsch")
  10. ; //+   detusch
  11.     (
  12.         (set @abort-button "Installation abrrechen!")
  13.         (set @error-msg    "Fataler Fehler!")
  14.  
  15.         (set #welcome (cat
  16.             "Wilkommen zur Installation von " @app-name "\n\n"
  17.             "© 1993-1995 Jürgen Frank und Michael Watzl\n"
  18.             "All rights reserved."))
  19.         (set #versionerror (cat
  20.             "Tut mir leid!\n\n"
  21.             @app-name
  22.             " benötigt mindestens Amiga-OS 2.04!\n"))
  23.         (set #uncompress
  24.             "Entpacke ")
  25.         (set #cantuncompress
  26.             "Fehler beim Entpacken von ")
  27.         (set #install
  28.             "Installiere ")
  29.         (set #hardware
  30.             "Baupläne")
  31.         (set #whichdrawer (cat
  32.             "Wo soll " @app-name " installiert werden?"))
  33.         (set #whichdrawer_help (cat
  34.             "Ein Verzeichnis namens '" @app-name "' wird erzeugt."))
  35.         (set #asklibs
  36.             "Welche Libraries sollen installiert werden?")
  37.         (set #asklibs_help (cat
  38.             "LANC.library\n"
  39.             "Zum Steuern von LANC-Kameras über die Parallelporthardware (LControl).\n\n"
  40.             "SLANC.library\n"
  41.             "Zum Steuern von LANC-Kameras über die Serialporthardware (SControl).\n\n"
  42.             "EDIT.library\n"
  43.             "Zum Steuern von 5-Pin-Edit über die Parallelporthardware (PControl)."
  44.             "(Die Hardware von LControl und PControl sind nicht kompatibel!\n\n"
  45.             "DEBUG.library\n"
  46.             "Täuscht eine Kamera nur vor." ))
  47.         (set #main
  48.             "Hauptprogramm")
  49.         (set #main_help (cat
  50.             "Das Hauptprogramm heißt zwar LControl, doch mit der "
  51.             "entsprechenden library wird es zu PControl, SControl..."))
  52.         (set #icon
  53.             "Piktogramm" )
  54.         (set #project_help (cat
  55.             "Die Piktogramme versorgen das Hauptprogramm (LControl) mit den passenden Parametern."))
  56.         (set #docs
  57.             "Anleitung")
  58.         (set #docs_help
  59.             "Amiga-guide-Datei, DVI-File und LIZENZ-Informationen")
  60.         (set #docs_pattern
  61.             "(LControlD.guide|LControlD.DVI|LIZENZ)")
  62.         (set #guide
  63.             "LControlD.guide")
  64.         (set #dvi
  65.             "LControlD.dvi")
  66.         (set #bye (cat
  67.             "Viel Spaß mit " @app-name
  68.             " wünschen\n"
  69.             "Jürgen Frank und Michael Watzl"))
  70.  
  71.  
  72.  
  73.  
  74.     )
  75. ; //-
  76. ; //+   englisch
  77.     (
  78.         (set #welcome (cat
  79.             "Welcome to the Installation of " @app-name "\n\n"
  80.             "© 1993-1995 Jürgen Frank and Michael Watzl\n"
  81.             "All rights reserved."))
  82.         (set #versionerror (cat
  83.             "Sorry!! " @app-name " requires Amiga-OS 2.04 of better!\n"))
  84.         (set #uncompress
  85.             "Uncompress ")
  86.         (set #cantuncompress
  87.             "Error while uncompressing ")
  88.         (set #install
  89.             "Installing ")
  90.         (set #hardware
  91.             "schematics")
  92.         (set #whichdrawer (cat
  93.             "Where should " @app-name " be installed?"))
  94.         (set #whichdrawer_help (cat
  95.             "A new drawer named '" @app-name "' will be created."))
  96.         (set #asklibs
  97.             "Which libraries should be installed?")
  98.         (set #asklibs_help (cat
  99.             "LANC.library\n"
  100.             "controls LANC-players via the parallelport harware (LControl).\n\n"
  101.             "SLANC.library\n"
  102.             "controls LANC-players via the serialport hardware (SControl).\n\n"
  103.             "EDIT.library\n"
  104.             "controls 5-Pin-Edit-players via the parallelport hardware (PControl)."
  105.             "(The PControl-hardware and the LControl-hardware are not compatible!)\n\n"
  106.             "DEBUG.library\n"
  107.             "Fakes a camera" ))
  108.         (set #main
  109.             "main program")
  110.         (set #main_help (cat
  111.             "The main programm is named LControl. However together with "
  112.             "the correct library it becomes PControl, SControl..."))
  113.         (set #icon
  114.             "icon" )
  115.         (set #project_help (cat
  116.             "The icons start the main programm (LControl) with the correct parameters"))
  117.         (set #docs
  118.             "Documentation")
  119.         (set #docs_help
  120.             "Amigaguide file, DVI-file and some licence information.")
  121.         (set #docs_pattern
  122.             "(LControlE.guide|LControlE.DVI|LICENCE)")
  123.         (set #guide
  124.             "LControlE.guide")
  125.         (set #dvi
  126.             "LControlE.dvi")
  127.         (set #bye (cat
  128.             "Jürgen Frank and Michael Watzl\n"
  129.             "wish you a lot of fun with\n"
  130.             @app-name))
  131.     )
  132. ; //-
  133. )
  134.  
  135. (message #welcome)
  136. (complete 0)
  137.  
  138. ; ***********************************************
  139. ; Amiga-OS Versionscheck
  140. ; ***********************************************
  141. (if (< (/ (getversion) 65536) 37)
  142.     (abort #version_error)
  143. )
  144.  
  145. ; ***********************************************
  146. ; Zielverzeichnis erzeugen
  147. ; ***********************************************
  148. (set ziel
  149.     (askdir
  150.         (prompt #whichdrawer )
  151.         (default "Work:")
  152.         (help   #whichdrawer_help )
  153.     )
  154. )
  155. (set @default-dest ziel )
  156. (set ziel (tackon ziel @app-name ))
  157. (makedir ziel (infos))
  158.  
  159.  
  160. ; ***********************************************
  161. ; Libs & Hardware entpacken (wenn vorhanden)
  162. ; => was wird eigentlich installiert?
  163. ; ***********************************************
  164. ; nach dem entpacken der hw wird eine vorauswahl
  165. ; initialisiert (bitweise):
  166. ;   1. LANC
  167. ;   2. SLANC
  168. ;   3. EDIT
  169. ;   4. DEBUG
  170.  
  171. (set options %1000) ; default: DEBUG
  172.  
  173. ; libs entpacken
  174. (working (cat "\n\n" #uncompress "libraries"))
  175. (set rc (run "libs.run t:"))
  176. (if (<> rc 0)
  177.     (abort (cat #cantuncompress "libraries"))
  178. )
  179.  
  180. (set L  0)
  181. (set S  0)
  182. (set E  0)
  183. (set D  0)
  184.  
  185. (if (exists "hardware.run")
  186.     (
  187.         ; hardware entpacken
  188.         (working (cat "\n\n" #uncompress #hardware))
  189.         (set rc (run "hardware.run t:"))
  190.         (if (<> rc 0)
  191.             (abort (cat #cantuncompress #hardware))
  192.         )
  193.         (if (exists "T:hardware/LANC.iff")
  194.             (set options (bitor options %0001)) ; options |= LANC
  195.         )
  196.         (if (exists "T:hardware/SLANC.iff")
  197.             (set options (bitor options %0010)) ; options |= SLANC
  198.         )
  199.         (if (exists "T:hardware/EDIT.iff")
  200.             (set options (bitor options %0100)) ; options |= EDIT
  201.         )
  202.     )
  203. )
  204.  
  205. (set x (askoptions
  206.     (prompt #asklibs)
  207.     (help   #asklibs_help)
  208.     (choices    "LANC.library" "SLANC.library" "EDIT.library" "DEBUG.library")
  209.     (default options)
  210. ))
  211. (if (<> 0 (bitand x %1000))   ; DEBUG
  212.     ( (set D 1)
  213.     (copylib
  214.         (source "t:libs/DEBUG.library")
  215.         (dest   "libs:")
  216.     ))
  217.  
  218. )
  219. (if (<> 0 (bitand x %0100))   ; EDIT
  220.     ((set E 1)
  221.     (copylib
  222.         (source "T:libs/EDIT.library")
  223.         (dest   "libs:")
  224.     ))
  225. )
  226. (if (<> 0 (bitand x %0010))   ; SLANC
  227.     ((set S 1)
  228.     (copylib
  229.         (source "T:libs/SLANC.library")
  230.         (dest   "libs:")
  231.     ))
  232. )
  233. (if (<> 0 (bitand x %0001))   ; LANC
  234.     ((set L 1)
  235.     (copylib
  236.         (source "T:libs/LANC.library")
  237.         (dest   "libs:")
  238.     ))
  239. )
  240.  
  241. ;cleanup libs
  242. (run "delete t:libs#? all quiet")
  243.  
  244. ; *****************************************************
  245. ; Hauptprogramm und Projects entpacken und installieren
  246. ; *****************************************************
  247.  
  248. ; libs entpacken
  249. (working (cat "\n\n" #uncompress #main ))
  250. (set rc (run "LControl.run t:"))
  251. (if (<> rc 0)
  252.     (abort (cat #cantuncompress #main))
  253. )
  254.  
  255. (copyfiles
  256.     (prompt #main)
  257.     (help #main_help)
  258.     (source "T:")
  259.     (choices "LControl")
  260.     (dest ziel)
  261.     (confirm "expert")
  262. )
  263.  
  264. (complete 10)
  265.  
  266. (if( (= L 1))
  267.     ((copyfiles
  268.         (prompt (cat "LControl-" #icon))
  269.         (help #project_help)
  270.         (source "T:")
  271.         (choices "LANC.info")
  272.         (dest ziel)
  273.         (confirm "expert")
  274.         (nogauge)
  275.     )
  276.     (tooltype
  277.         (dest (tackon ziel "LANC"))
  278.         (noposition)
  279.     ))
  280. )
  281. (if( (= S 1))
  282.     ((copyfiles
  283.         (prompt (cat "SControl-" #icon))
  284.         (help #project_help)
  285.         (source "T:")
  286.         (choices "SLANC.info")
  287.         (dest ziel)
  288.         (confirm "expert")
  289.         (nogauge)
  290.     )
  291.     (tooltype
  292.         (dest (tackon ziel "SLANC"))
  293.         (noposition)
  294.     ))
  295. )
  296. (if( (= E 1))
  297.     ((copyfiles
  298.         (prompt (cat "PControl-" #icon))
  299.         (help #project_help)
  300.         (source "T:")
  301.         (choices "EDIT.info")
  302.         (dest ziel)
  303.         (confirm "expert")
  304.         (nogauge)
  305.     )
  306.     (tooltype
  307.         (dest (tackon ziel "EDIT"))
  308.         (noposition)
  309.     ))
  310. )
  311. (if( (= D 1))
  312.     ((copyfiles
  313.         (prompt (cat "DControl-" #icon))
  314.         (help #project_help)
  315.         (source "T:")
  316.         (choices "DEBUG.info")
  317.         (dest ziel)
  318.         (confirm "expert")
  319.         (nogauge)
  320.     )
  321.     (tooltype
  322.         (dest (tackon ziel "DEBUG"))
  323.         (noposition)
  324.     ))
  325. )
  326. ;cleanup
  327. (run "delete t:LControl")                        ; the main prg
  328. (run "delete t:(LANC|SLANC|EDIT|DEBUG).info")    ; the projects
  329.  
  330. (complete 20)
  331.  
  332. ; catalogs kopieren (wenn deutsch)
  333. (if (= @language "deutsch")(
  334.     (working (cat "\n\n" #uncompress "catalogs"))
  335.     (set rc (run "catalogs.run T:"))
  336.     (if (<> rc 0)
  337.         (abort (cat #cantuncompress "libraries"))
  338.         (; else
  339.             (makedir (tackon ziel "catalogs"))
  340.             (copyfiles
  341.                 (source "t:catalogs")
  342.                 (dest (tackon ziel "catalogs"))
  343.                 (all)
  344.                 (nogauge)
  345.             )
  346.         )
  347.     )
  348.     ; cleanup
  349.     (run "delete T:catalogs#? all quiet")
  350. ))
  351. (complete 30)
  352.  
  353. (if (exists "hardware.run")(
  354.     (makedir (tackon ziel "Hardware"))
  355.     (copyfiles
  356.         (source "T:Hardware.info")
  357.         (dest ziel)
  358.         (nogauge)
  359.     )
  360.  
  361.     (copyfiles
  362.         (source "T:hardware")
  363.         (dest (tackon ziel "Hardware"))
  364.         (all)
  365.         (nogauge)
  366.     )
  367.  
  368.     ; cleanup hardware
  369.     (run "delete T:hardware#? all quiet")
  370. ))
  371. (complete 40)
  372.  
  373.  
  374. ; ***********************************************
  375. ; Install documentation
  376. ; ***********************************************
  377. (working "\n\n" #uncompress #docs)
  378. (set rc (run "docs.run T:"))
  379. (if (<> rc 0)
  380.     (abort (cat #cantuncompress #docs))
  381. )
  382. (makedir (tackon ziel #docs))
  383. (copyfiles
  384.     (source "T:docs.info")
  385.     (dest ziel)
  386.     (newname (cat #docs ".info"))
  387.     (nogauge)
  388. )
  389. (copyfiles
  390.     (source "T:docs")
  391.     (dest (tackon ziel #docs))
  392.     (pattern #docs_pattern)
  393.     (infos)
  394. )
  395. ;cleanup docs
  396. (run "delete t:docs#? all quiet")
  397. (complete 70)
  398.  
  399. ; tooltypes anpassen
  400. (set tt "sys:utilities/more")
  401. (if (exists( "sys:utilities/amigaguide" (noreq)))
  402.     (set tt "sys:utilities/amigaguide")
  403. )
  404. (if (exists( "sys:utilities/multiview" (noreq)))
  405.     (set tt "sys:utilities/multiview")
  406. )
  407.  
  408. (set docpath (tackon ziel #docs ))
  409.  
  410. (tooltype
  411.     (dest (tackon docpath #guide ))
  412.     (setdefaulttool tt)
  413.     (noposition)
  414. )
  415. (tooltype
  416.     (dest (tackon docpath #dvi ))
  417.     (noposition)
  418. )
  419. (complete 80)
  420.  
  421. ; *********************************************
  422. ; install ARex-Examples
  423. ; *********************************************
  424. (working "\n\n" #uncompress "ARexx")
  425. (set rc (run "arexx.run T:"))
  426. (if (<> rc 0)
  427.     (abort (cat #cantuncompress "ARexx"))
  428. )
  429. (makedir (tackon ziel "ARexx" ))
  430. (copyfiles
  431.     (source "T:ARexx.info")
  432.     (dest ziel)
  433.     (nogauge)
  434. )
  435. (copyfiles
  436.     (source "T:ARexx")
  437.     (dest (tackon ziel "ARexx"))
  438.     (all)
  439. )
  440. ;cleanup arexx
  441. (run "delete t:arexx#? all quiet")
  442. (complete 100)
  443.  
  444. (message #bye)
  445. (exit)
  446.  
  447.  
  448.